package com.example.demo.common.enums;

public enum ExceptionStatus {
    UN_AUTHORIZE(MessageStatus.ERROR.value(), "没有访问权限"),
    
    USER_NOT_FOUND(MessageStatus.ERROR.value(), "用户名或密码错误"),
    
    USER_IS_DISABLED(MessageStatus.ERROR.value(), "账户已停用"),
    
    PASSWORD_ERROR(MessageStatus.ERROR.value(), "密码错误"),
    
    PASSWORD_DISACCORD(MessageStatus.ERROR.value(), "两次输入的密码不一致"),
    
    APPID_INVALID(MessageStatus.ERROR.value(), "APPID无效"),
    
    DIGEST_INVALID(MessageStatus.ERROR.value(), "摘要错误"),
    
    TOKEN_INVALID(MessageStatus.TOKEN_ILLEGAL.value(), MessageStatus.TOKEN_ILLEGAL.message()),
    
    TOKEN_EXPIRED(MessageStatus.TOKEN_EXPIRED.value(), MessageStatus.TOKEN_EXPIRED.message()),
    
    UNKNOWN_ERROR(MessageStatus.ERROR.value(), MessageStatus.UNKNOWN_ERROR.message());
    
    private final Integer value;
    private final String message;
    
    ExceptionStatus(Integer value, String message) {
        this.value = value;
        this.message = message;
    }
    
    public int value() {
        return this.value;
    }
    
    public String message() {
        return this.message;
    }
}
